Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimisations #12

Merged
merged 7 commits into from
Nov 22, 2023
Merged

Optimisations #12

merged 7 commits into from
Nov 22, 2023

Conversation

je-cook
Copy link
Contributor

@je-cook je-cook commented Nov 17, 2023

A few optimisations to use numpy loops instead of python loops and some typing

@@ -307,18 +304,16 @@ def convergence_value(
The Lagrange multipliers for inequality constraints for the jth
evaluation point.
"""
ind_eq = min(lamda_equality.shape[0], result.eq.shape[0])
ind_ieq = min(lamda_inequality.shape[0], result.ie.shape[0])
Copy link
Contributor Author

@je-cook je-cook Nov 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be overkill but it will ensure the same functionality as zip

src/pyvmcon/vmcon.py Outdated Show resolved Hide resolved
@timothy-nunn
Copy link
Collaborator

@je-cook is this ready for review? If not, can you request review when ready?

@je-cook
Copy link
Contributor Author

je-cook commented Nov 21, 2023

@timothy-nunn I would but I obviously dont have permissions to do that

@timothy-nunn
Copy link
Collaborator

@je-cook oh sorry. I assumed everyone in the UKAEA org would be allowed to request review (as is the case on PROCESS?). I'll do that for you tomorrow

@je-cook
Copy link
Contributor Author

je-cook commented Nov 21, 2023

Im not in the org so that would be why, I think on PROCESS I might be an external collaborator

@timothy-nunn timothy-nunn self-requested a review November 21, 2023 16:36
Copy link
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all looks good, thanks for this. Interested to see how much this speeds codes (e.g. PROCESS) up because I did notice that old VMCON vs this VMCON was slightly faster.

@timothy-nunn timothy-nunn merged commit aa78993 into ukaea:main Nov 22, 2023
9 checks passed
@je-cook je-cook deleted the optimisations branch November 22, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants